import React from 'react';
import { connect } from 'dva';
import styles from '../components/Users/Users.css';
import WrappedNormalLoginForm from '../components/Users/Login';


function Login({ location ,dispatch}) {

    function loginHandler(values) {
      dispatch({
        type: 'users/login',
        payload: values
      });
  } 
  /*function repeatPasswordHandler(values) {
      dispatch({
        type: 'users/repeatPwd',
        payload: values
      });
  }*/


    return (
      <div className={styles.normal}>
        <WrappedNormalLoginForm onOk={loginHandler} /*repeatPwd={repeatPasswordHandler}*//>
      </div>
    );
}


function mapStateToProps(state) {
  return {
    loading: state.loading.models.users
  };
}

export default connect(mapStateToProps)(Login);

